﻿<UserControl x:Class="SoftTeach.View.Noten.MetroKlassenlisteNotenDetailView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d" 
             d:DesignHeight="101" d:DesignWidth="600"
             FontSize="18">
  <UserControl.Resources>
    <SolidColorBrush x:Key="AnimatedBrush" Color="Transparent" />
    <!-- Defines a RadioButton style. -->
    <Style TargetType="{x:Type RadioButton}" x:Key="MetroNotenClickButton">
      <Setter Property="SnapsToDevicePixels" Value="true" />
      <Setter Property="OverridesDefaultStyle" Value="true" />
      <Setter Property="Margin" Value="1"/>
      <Setter Property="Padding" Value="10,3"/>
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="{x:Type RadioButton}">
            <BulletDecorator Background="Transparent">
              <BulletDecorator.Bullet>
                <Grid x:Name="ParentGrid" Background="White">
                  <Border x:Name="CheckMark" Margin="1">
                    <Border.Background>
                      <SolidColorBrush Color="White"/>
                    </Border.Background>

                    <ContentPresenter Margin="10,3"
                            RecognizesAccessKey="True" />
                  </Border>
                </Grid>
              </BulletDecorator.Bullet>
              <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                  <VisualState x:Name="Normal" />
                  <VisualState x:Name="MouseOver">
                    <Storyboard>
                      <ColorAnimation Duration="0:0:0.10" Storyboard.TargetName="ParentGrid" Storyboard.TargetProperty="Background.Color" To="LightGray"/>
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="Pressed">
                    <Storyboard>
                      <ColorAnimation Duration="0:0:0.10" Storyboard.TargetName="CheckMark" Storyboard.TargetProperty="Background.Color" To="LightGreen"/>
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="Disabled">
                    <Storyboard>
                      <ColorAnimation Duration="0:0:0.10" Storyboard.TargetName="CheckMark" Storyboard.TargetProperty="Background.Color" To="LightGray"/>
                    </Storyboard>
                  </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="CheckStates">
                  <VisualState x:Name="Checked">
                    <Storyboard>
                      <ColorAnimation  Duration="0:0:0.10" Storyboard.TargetName="CheckMark" Storyboard.TargetProperty="Background.Color" To="LightGreen"/>
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="Unchecked">
                    <Storyboard>
                      <ColorAnimation Duration="0:0:0.10" Storyboard.TargetName="CheckMark" Storyboard.TargetProperty="Background.Color" To="White"/>
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="Indeterminate" />
                </VisualStateGroup>
              </VisualStateManager.VisualStateGroups>
            </BulletDecorator>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>
  </UserControl.Resources>
  <Grid>
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="40"/>
      <ColumnDefinition MinWidth="200" Width="Auto"/>
      <ColumnDefinition Width="Auto"/>
      <ColumnDefinition Width="Auto"/>
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>
    <Image Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Height="50" Source="{Binding Path=SchülereintragPerson.PersonBild}" Margin="0"/>
    <StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal">
      <Label Content="{Binding Path=SchülereintragPerson.PersonVorname}"/>
      <Label Content="{Binding Path=SchülereintragPerson.PersonNachname}"/>
    </StackPanel>
    <Label Grid.Row="0" Grid.Column="2" VerticalAlignment="Center" Padding="0">Qualität</Label>
    <UniformGrid Grid.Row="0" Grid.Column="3" Margin="0" Rows="1" Columns="6">
      <RadioButton Command="{Binding Path=Qualität1Command}" Style="{StaticResource MetroNotenClickButton}" Content="1"/>
      <RadioButton Command="{Binding Path=Qualität2Command}" Style="{StaticResource MetroNotenClickButton}" Content="2"/>
      <RadioButton Command="{Binding Path=Qualität3Command}" Style="{StaticResource MetroNotenClickButton}" Content="3"/>
      <RadioButton Command="{Binding Path=Qualität4Command}" Style="{StaticResource MetroNotenClickButton}" Content="4"/>
      <RadioButton Command="{Binding Path=Qualität5Command}" Style="{StaticResource MetroNotenClickButton}" Content="5"/>
      <RadioButton Command="{Binding Path=Qualität6Command}" Style="{StaticResource MetroNotenClickButton}" Content="6"/>
    </UniformGrid>
    <Label Grid.Row="1" Grid.Column="2" VerticalAlignment="Center" Padding="0">Quantität</Label>
    <UniformGrid Grid.Row="1" Grid.Column="3" Margin="0" Rows="1" Columns="6">
      <RadioButton Command="{Binding Path=Quantität1Command}" Background="{StaticResource AnimatedBrush}" Style="{StaticResource MetroNotenClickButton}" Content="1"/>
      <RadioButton Command="{Binding Path=Quantität2Command}" Style="{StaticResource MetroNotenClickButton}" Content="2"/>
      <RadioButton Command="{Binding Path=Quantität3Command}" Style="{StaticResource MetroNotenClickButton}" Content="3"/>
      <RadioButton Command="{Binding Path=Quantität4Command}" Style="{StaticResource MetroNotenClickButton}" Content="4"/>
      <RadioButton Command="{Binding Path=Quantität5Command}" Style="{StaticResource MetroNotenClickButton}" Content="5"/>
      <RadioButton Command="{Binding Path=Quantität6Command}" Style="{StaticResource MetroNotenClickButton}" Content="6"/>
    </UniformGrid>
  </Grid>
</UserControl>
